import { request } from './request'
// 首页的请求
// 分类页面的数据获取
export function _getBanner () {
  return request({
    url: '/banner'
  })
}

// 获取每日推荐的音乐
export function _getRecommendResource (cookie, uid) {
  return request({
    url: '/recommend/songs',
    params: {
      cookie: cookie,
      uid: uid
    }
  })
}

// 获取Main音乐列表
export function _getPersonalized (config) {
  return request({
    url: '/personalized',
    params: {
      limit: config
    }
  })
}

export function _getPrivateContent () {
  return request({
    url: '/personalized/privatecontent'
  })
}
// 热门歌曲
export function _getMusicListHot () {
  return request({
    url: '/playlist/hot'
  })
}
export function _getHighquality (cat, limit) {
  return request({
    url: '/top/playlist/highquality',
    params: {
      cat: cat,
      limit: limit,
      time: new Date().getTime()
    }
  })
}

// 获取音乐排名
export function _getRankList () {
  return request({
    url: '/toplist'
  })
}
// 获取语种和歌手类别
export function _getArtist (area, type, limit) {
  return request({
    url: '/artist/list',
    params: {
      area: area,
      type: type,
      limit: limit
    }
  })
}
export function _getTopSongs (type) {
  return request({
    url: '/top/song',
    params: {
      type: type
    }
  })
}
